package com.yamanyar.weebill.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yamanyar.weebill.dao.ActionPathDAO;
import com.yamanyar.weebill.domain.ActionPath;
import com.yamanyar.weebill.service.ActionPathService;
/**
 * Implementation of <code>ActionPathService</code> interface.
 * Created in Jun 28, 2008.
 * @see ActionPathservice
 * @author Kaan Yamanyar
 */
@Service
public class ActionPathServiceImpl implements ActionPathService {

	private ActionPathDAO actionPathDAO;

	@Autowired
	public ActionPathServiceImpl(ActionPathDAO actionPathDAO) {
		this.actionPathDAO = actionPathDAO;
	}

	public void createNew(ActionPath actionPath) {
		actionPathDAO.persist(actionPath);
	}

	public List<ActionPath> findAll() {
		return actionPathDAO.loadAll();
	}

	public List<ActionPath> findByName(String name) {
		return actionPathDAO.findByName(name);
	}

	public ActionPath getActionPathWithID(Long id) {
		return actionPathDAO.loadById(id);
	}

}
